package com.woniuxy.producerconsumer.controller;

import com.woniuxy.pojo.Mail;
import com.woniuxy.producerconsumer.service.PCService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * @Author: hlf
 * @Description: TODO
 * @DateTime: 22/12/29/0029 14:59
 * @Component: 成都蜗牛学苑
 **/
@Controller
public class PCController {

    @Resource
    PCService pcService;

    @RequestMapping("produce")
    @ResponseBody
    public  void produce(@ModelAttribute("mail") Mail mail){
        pcService.sendMail("PCQueue",mail);
    }
}
